package com.eascs.web.o2o.report.dto;

import java.io.Serializable;
import java.time.LocalDate;
import java.util.List;

import com.eascs.web.o2o.report.constants.SendType;

/**
 * 消息
 * @author long.wang
 *
 */
public class MessageDTO  implements Serializable{
	private static final long serialVersionUID = 472671301789663628L;
	/** 消息内容 **/
	private String msgContent;
	
	/**
	 * 消息发送类型:<br>
	 * 1.立即发送 {@link SendType#NOW}
	 * 2.定时发送 {@link SendType#ONTIME}
	 * @see SendType
	 */
	private SendType sendType;
	
	/**
	 * 消息发送时间<br>
	 * 当消息类型为{@link SendType#NOW}时，不需要设值
	 * 当消息类型为{@link SendType#ONTIME}时，需要设值，不设置默认为当日
	 */
	private String sendTime;
	
	/** 消息发送人  e.g. longlong.wang **/
	private String senderName;
	
	/** 消息接受者**/
	private List<MessageReceiver> receivers;
	
	private String id;

	public String getMsgContent() {
		return msgContent;
	}

	public void setMsgContent(String msgContent) {
		this.msgContent = msgContent;
	}

	public SendType getSendType() {
		return sendType;
	}

	public void setSendType(SendType sendType) {
		this.sendType = sendType;
	}

	public String getSendTime() {
		return sendTime == null ? LocalDate.now().toString() : sendTime;
	}

	public void setSendTime(String sendTime) {
		this.sendTime = sendTime;
	}

	public String getSenderName() {
		return senderName;
	}

	public void setSenderName(String senderName) {
		this.senderName = senderName;
	}

	public List<MessageReceiver> getReceivers() {
		return receivers;
	}

	public void setReceivers(List<MessageReceiver> receivers) {
		this.receivers = receivers;
	}

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}
	
}
